﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Autofac;
using ggHD.DAL.Repositories;
using ggHD.Domain.Repisitories;
using LinqToDB;
using LinqToDB.Linq;

namespace ggHD.DAL.Modules
{
    public class DalModule: Module
    {
        protected override void Load(ContainerBuilder builder)
        {
            // b.RegisterType<ggHDDB>().AsSelf().InstancePerLifetimeScope();
            builder.RegisterType<ggHDDB>().AsSelf().As<IUnitOfWork>().As<IDataContext>().InstancePerLifetimeScope();
            builder.RegisterType<CustomerRepository>().As<ICustomerRepository>();
            builder.RegisterType<RawMailRepository>().As<IRawMailRepository>();
            builder.RegisterType<TicketHeaderRepository>().As<ITicketHeaderRepository>();
            builder.RegisterType<ExternalInitiatorRepository>().As<IExternalInitiatorRepository>();

        }
    }
}
